#include "packet.h"

Packet::Packet() { }

void Packet::addPart(QByteArray part) {
	parts.push_back(part);
}

bool Packet::hasParts() {
	return !(parts.empty());
}

QByteArray Packet::getPart() {
	if(hasParts()) {
		QByteArray result = parts.at(0);
		parts.removeFirst();

		return result;
	} else return QByteArray();
}
